{ "openapi": "3.0.0", "info": { "title": "Antifraud Provider", "description": "Endpoints that deal with to Antifraud Provider operations", "contact": {}, "version": "1.0" }, "servers": [ { "url": "http://{providerApiEndpoint}", "description": "VTEX server URL", "variables": { "providerApiEndpoint": { "description": "The antifraud provider endpoint URL", "default": "{providerApiEndpoint}" } } } ], "paths": { "/pre-analysis": { "post": { "tags": [ "Antifraud Flow" ], "summary": "Send Antifraud Pre-Analysis Data (optional)", "description": "Receives a new transaction antifraud data for (synchronous) pre-analysis. This step is performed before payments authorization.", "operationId": "SendAntifraudPreAnalysisData", "parameters": [ { "name": "Content-Type", "in": "header", "description": "The Media type of the body of the request. Default value for payment provider protocol is application/json", "required": true, "style": "simple", "schema": { "type": "string", "default": "application/json" } }, { "name": "Accept", "in": "header", "description": "Media type(s) that is/are acceptable for the response. Default value for payment provider protocol is application/json", "required": true, "style": "simple", "schema": { "type": "string", "default": "application/json" } }, { "name": "X-PROVIDER-API-AppKey", "in": "header", "description": "", "required": true, "style": "simple", "schema": { "type": "string", "default": "{{X-VTEX-API-AppKey}}", "description": "The AppKey configured by the merchant" } }, { "name": "X-PROVIDER-API-AppToken", "in": "header", "description": "", "required": true, "style": "simple", "schema": { "type": "string", "default": "{{X-VTEX-API-AppToken}}", "description": "The AppToken configured by the merchant" } } ], "requestBody": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SendAntifraudDataRequest" }, "example": { "id": "D3AA1FC8372E430E8236649DB5EBD08E", "sellerId": "vtexargentina", "reference": "v32478982vtx-01", "value": 10, "ip": "10.0.0.1", "store": "serasa", "deviceFingerprint": "Generated_using_GTM_Store_Is_Responsible_To_Configure", "miniCart": { "buyer": { "id": "c1245228-1c68-11e6-94ac-0afa86a846a5", "firstName": "John", "lastName": "Doe", "document": "012.345.678-90", "documentType": "CPF", "email": "john@doe.com", "phone": "+5521987654321", "address": { "country": "BRA", "street": "Rua Praia de Botafogo", "number": "518", "complement": "2o. andar", "neighborhood": "Botafogo", "postalCode": "22250-040", "city": "Rio de Janeiro", "state": "RJ" } }, "shipping": { "value": 8.41, "estimatedDate": "2017-08-02T14:46:47", "address": { "country": "BRA", "street": "Rua Praia de Botafogo", "number": "518", "complement": "2o. andar", "neighborhood": "Botafogo", "postalCode": "22250-040", "city": "Rio de Janeiro", "state": "RJ" } }, "items": [ { "id": "132981", "name": "Some useful product", "price": 20.51, "quantity": 2, "deliveryType": "Normal", "deliverySlaInMinutes": 4320, "categoryId": "111", "categoryName": "Electronica", "discount": 1.99, "sellerId": "vtexargentina" }, { "id": "123242", "name": "Some useless product", "price": 21.98, "quantity": 1, "deliveryType": "Normal", "deliverySlaInMinutes": 4320, "categoryId": "123", "categoryName": "Lar", "discount": 1.01, "sellerId": "vtexargentina" } ], "taxValue": 5.58, "listRegistry": { "name": "Minha lista Presente", "deliveryToOwner": false } }, "payments": [ { "id": "2D00FE", "method": "CreditCard", "name": "Visa", "currencyIso4217": "BRL", "value": 63.98, "installments": 3, "details": { "bin": "507860", "lastDigits": "2798", "holder": "Client", "address": { "country": "BRA", "street": "Rua Praia de Botafogo", "number": "518", "complement": "2o. andar", "neighborhood": "Botafogo", "postalCode": "22250-040", "city": "Rio de Janeiro", "state": "RJ" } } }, { "id": "04D430E517B2494FBC3DF7721CCDACC7", "method": "GiftCard", "value": 10.01, "currencyIso4217": "BRL", "installments": 1 } ], "hook": "https://hook.vtex.com/notifyIfChangeStatus", "transactionStartDate": "2020-10-30T18:08:23Z" } } }, "required": true }, "responses": { "200": { "description": "", "headers": {}, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SendAntifraudData" }, "examples": { "response": { "value": { "id": "D3AA1FC8372E430E8236649DB5EBD08E", "tid": "4692c1f54d514fe69da0b472a3b2a770", "code": "customCode", "message": "customMessage", "status": "approved", "score": 5.01, "analysisType": "authomatic", "responses": { "foo": "anyFoo", "custom": "customAnyValue" } } } } } } } }, "deprecated": false } }, "/transactions": { "post": { "tags": [ "Antifraud Flow" ], "summary": "Send Antifraud Data", "description": "Receives a new transaction antifraud data. This step is performed only if all payments are authorized.", "operationId": "SendAntifraudData", "parameters": [ { "name": "Content-Type", "in": "header", "description": "The Media type of the body of the request. Default value for payment provider protocol is application/json", "required": true, "style": "simple", "schema": { "type": "string", "default": "application/json" } }, { "name": "Accept", "in": "header", "description": "Media type(s) that is/are acceptable for the response. Default value for payment provider protocol is application/json", "required": true, "style": "simple", "schema": { "type": "string", "default": "application/json" } }, { "name": "X-PROVIDER-API-AppKey", "in": "header", "description": "", "required": true, "style": "simple", "schema": { "type": "string", "default": "{{X-VTEX-API-AppKey}}" } }, { "name": "X-PROVIDER-API-AppToken", "in": "header", "description": "", "required": true, "style": "simple", "schema": { "type": "string", "default": "{{X-VTEX-API-AppToken}}" } } ], "requestBody": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SendAntifraudDataRequest" }, "example": { "id": "D3AA1FC8372E430E8236649DB5EBD08E", "sellerId": "vtexargentina", "reference": "v32478982vtx-01", "value": 10, "transactionStartDate": "2020-10-30T18:08:23Z", "ip": "10.0.0.1", "store": "serasa", "deviceFingerprint": "Generated_using_GTM_Store_Is_Responsible_To_Configure", "miniCart": { "buyer": { "id": "c1245228-1c68-11e6-94ac-0afa86a846a5", "firstName": "John", "lastName": "Doe", "document": "012.345.678-90", "documentType": "CPF", "email": "john@doe.com", "phone": "+5521987654321", "address": { "country": "BRA", "street": "Rua Praia de Botafogo", "number": "518", "complement": "2o. andar", "neighborhood": "Botafogo", "postalCode": "22250-040", "city": "Rio de Janeiro", "state": "RJ" } }, "shipping": { "value": 8.41, "estimatedDate": "2017-08-02T14:46:47", "address": { "country": "BRA", "street": "Rua Praia de Botafogo", "number": "518", "complement": "2o. andar", "neighborhood": "Botafogo", "postalCode": "22250-040", "city": "Rio de Janeiro", "state": "RJ" } }, "items": [ { "id": "132981", "name": "Some useful product", "price": 20.51, "quantity": 2, "deliveryType": "Normal", "deliverySlaInMinutes": 4320, "categoryId": "111", "categoryName": "Electronica", "discount": 1.99, "sellerId": "vtexargentina" }, { "id": "123242", "name": "Some useless product", "price": 21.98, "quantity": 1, "deliveryType": "Normal", "deliverySlaInMinutes": 4320, "categoryId": "123", "categoryName": "Lar", "discount": 1.01, "sellerId": "vtexargentina" } ], "taxValue": 5.58, "listRegistry": { "name": "Minha lista Presente", "deliveryToOwner": false } }, "payments": [ { "id": "2D00F", "method": "CreditCard", "name": "Visa", "value": 63.98, "currencyIso4217": "BRL", "installments": 3, "details": { "bin": "507860", "lastDigits": "2798", "holder": "John Doe", "address": { "country": "BRA", "street": "Rua Praia de Botafogo", "number": "518", "complement": "2o. andar", "neighborhood": "Botafogo", "postalCode": "22250-040", "city": "Rio de Janeiro", "state": "RJ" } } }, { "id": "04D430E517B2494FBC3DF7721CCDACC7", "method": "GiftCard", "value": 10.01, "currencyIso4217": "BRL", "installments": 1 } ], "hook": "https://hook.vtex.com/notifyIfChangeStatus" } } }, "required": true }, "responses": { "200": { "description": "", "headers": { "access-control-allow-credentials": { "content": { "text/plain": { "schema": { "type": "string" }, "example": "true" } } }, "access-control-allow-origin": { "content": { "text/plain": { "schema": { "type": "string" }, "example": "chrome-extension://aicmkgpgakddgnaphhhpliifpcfhicfo" } } }, "cache-control": { "content": { "text/plain": { "schema": { "type": "string" }, "example": "no-cache" } } }, "connection": { "content": { "text/plain": { "schema": { "type": "string" }, "example": "keep-alive" } } }, "content-length": { "content": { "text/plain": { "schema": { "type": "string" }, "example": "244" } } }, "content-type": { "content": { "text/plain": { "schema": { "type": "string" }, "example": "application/json; charset=utf-8" } } }, "date": { "content": { "text/plain": { "schema": { "type": "string" }, "example": "Mon, 07 May 2018 16:15:43 GMT" } } }, "expires": { "content": { "text/plain": { "schema": { "type": "string" }, "example": "-1" } } }, "pragma": { "content": { "text/plain": { "schema": { "type": "string" }, "example": "no-cache" } } }, "server": { "content": { "text/plain": { "schema": { "type": "string" }, "example": "Microsoft-IIS/8.0" } } }, "x-aspnet-version": { "content": { "text/plain": { "schema": { "type": "string" }, "example": "4.0.30319" } } }, "x-powered-by": { "content": { "text/plain": { "schema": { "type": "string" }, "example": "ASP.NET" } } }, "x-vtex-operation-id": { "content": { "text/plain": { "schema": { "type": "string" }, "example": "125de297-43d9-4d71-b89d-d238d0a1e454" } } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SendAntifraudData" }, "example": { "id": "D3AA1FC8372E430E8236649DB5EBD08E", "tid": "4692c1f54d514fe69da0b472a3b2a770", "code": "customCode", "message": "customMessage", "status": "received", "score": 5.01, "analysisType": "authomatic", "responses": { "foo": "anyFoo", "custom": "customAnyValue" } } } } } }, "deprecated": false, "servers": [ { "url": "https://{{providerApiEndpoint}}", "description": "VTEX server URL" } ] } }, "/transactions/{transactionId}": { "put": { "tags": [ "Antifraud Flow" ], "summary": "Update Antifraud Transactions (optional)", "description": "Receives a new transaction antifraud data. This step is performed only if all payments are authorized.", "operationId": "UpdateAntifraudTransactions(optional)", "parameters": [ { "name": "Content-Type", "in": "header", "description": "", "required": true, "style": "simple", "schema": { "type": "string", "example": "application/json" } }, { "name": "X-PROVIDER-API-AppKey", "in": "header", "description": "", "required": true, "style": "simple", "schema": { "type": "string", "default": "{{X-VTEX-API-AppKey}}" } }, { "name": "X-PROVIDER-API-AppToken", "in": "header", "description": "", "required": true, "style": "simple", "schema": { "type": "string", "default": "{{X-VTEX-API-AppToken}}" } }, { "name": "transactionId", "in": "path", "description": "", "required": true, "style": "simple", "schema": { "type": "string" } } ], "requestBody": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateAntifraudTransactionsoptionalRequest" }, "example": { "id": "D3AA1FC8372E430E8236649DB5EBD08E", "reference": "v32478982vtx-01", "value": 10, "ip": "10.0.0.1", "store": "serasa", "deviceFingerprint": "Generated_using_GTM_Store_Is_Responsible_To_Configure", "miniCart": { "buyer": { "id": "c1245228-1c68-11e6-94ac-0afa86a846a5", "firstName": "John", "lastName": "Doe", "document": "012.345.678-90", "documentType": "CPF", "email": "john@doe.com", "phone": "+5521987654321", "address": { "country": "BRA", "street": "Rua Praia de Botafogo", "number": "518", "complement": "2o. andar", "neighborhood": "Botafogo", "postalCode": "22250-040", "city": "Rio de Janeiro", "state": "RJ" } }, "shipping": { "value": 8.41, "estimatedDate": "2017-08-02T14:46:47", "address": { "country": "BRA", "street": "Rua Praia de Botafogo", "number": "518", "complement": "2o. andar", "neighborhood": "Botafogo", "postalCode": "22250-040", "city": "Rio de Janeiro", "state": "RJ" } }, "items": [ { "id": "132981", "name": "Some useful product", "price": 20.51, "quantity": 2, "deliveryType": "Normal", "deliverySlaInMinutes": 4320, "categoryId": "111", "categoryName": "Electronica", "discount": 1.99, "sellerId": "vtexargentina" }, { "id": "123242", "name": "Some useless product", "price": 21.98, "quantity": 1, "deliveryType": "Normal", "deliverySlaInMinutes": 4320, "categoryId": "123", "categoryName": "Lar", "discount": 1.01, "sellerId": "vtexargentina" } ], "taxValue": 5.58, "listRegistry": { "name": "Minha lista Presente", "deliveryToOwner": false } }, "payments": [ { "id": "2D00FE", "method": "CreditCard", "name": "Visa", "value": 63.98, "currencyIso4217": "BRL", "installments": 3, "details": { "bin": "507860", "lastDigits": "2798", "holder": "John Doe", "address": { "country": "BRA", "street": "Rua Praia de Botafogo", "number": "518", "complement": "2o. andar", "neighborhood": "Botafogo", "postalCode": "22250-040", "city": "Rio de Janeiro", "state": "RJ" } } }, { "id": "04D430E517B2494FBC3DF7721CCDACC7", "method": "GiftCard", "value": 10.01, "currencyIso4217": "BRL", "installments": 1 } ], "hook": "https://hook.vtex.com/notifyIfChangeStatus" } } }, "required": true }, "responses": { "200": { "description": "", "headers": { "Access-Control-Allow-Credentials": { "content": { "text/plain": { "schema": { "type": "string" }, "example": "true" } } }, "Access-Control-Allow-Origin": { "content": { "text/plain": { "schema": { "type": "string" }, "example": "chrome-extension://aicmkgpgakddgnaphhhpliifpcfhicfo" } } }, "Cache-Control": { "content": { "text/plain": { "schema": { "type": "string" }, "example": "no-cache" } } }, "Connection": { "content": { "text/plain": { "schema": { "type": "string" }, "example": "keep-alive" } } }, "Content-Length": { "content": { "text/plain": { "schema": { "type": "string" }, "example": "132" } } }, "Date": { "content": { "text/plain": { "schema": { "type": "string" }, "example": "Wed, 02 Aug 2017 18:21:50 GMT" } } }, "Expires": { "content": { "text/plain": { "schema": { "type": "string" }, "example": "-1" } } }, "Pragma": { "content": { "text/plain": { "schema": { "type": "string" }, "example": "no-cache" } } }, "Server": { "content": { "text/plain": { "schema": { "type": "string" }, "example": "Microsoft-IIS/8.0" } } }, "X-AspNet-Version": { "content": { "text/plain": { "schema": { "type": "string" }, "example": "4.0.30319" } } }, "X-Powered-By": { "content": { "text/plain": { "schema": { "type": "string" }, "example": "ASP.NET" } } }, "x-vtex-operation-id": { "content": { "text/plain": { "schema": { "type": "string" }, "example": "4d2e58c7-ea79-4420-96db-8e4bf32847ce" } } } }, "content": { "application/json; charset=utf-8": { "schema": { "$ref": "#/components/schemas/ApproveAntifraudAnalysisResponse" }, "example": { "id": "D3AA1FC8372E430E8236649DB5EBD08E", "status": "approved", "fraudRiskPercentage": 0.0, "analysisType": "authomatic", "responses": null } } } } }, "deprecated": false, "servers": [ { "url": "http://{{providerApiEndpoint}}", "description": "VTEX server URL" } ] } }, "/manifest": { "get": { "tags": [ "Antifraud Flow" ], "summary": "List Antifraud Provider Manifest", "description": "Returns the custom fields of the antifraud provider manifest", "operationId": "Manifest", "parameters": [ { "name": "Content-Type", "in": "header", "description": "The Media type of the body of the request. Default value for antifraud provider protocol is application/json", "required": true, "style": "simple", "schema": { "type": "string", "default": "application/json" } }, { "name": "Accept", "in": "header", "description": "Media type(s) that is/are acceptable for the response. Default value for antifraud provider protocol is application/json", "required": true, "style": "simple", "schema": { "type": "string", "default": "application/json" } } ], "responses": { "200": { "description": "", "headers": {}, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Success" }, "examples": { "response": { "value": { "cardholderDocument": "required", "customFields": [ { "name": "ApiKey", "type": "text" }, { "name": "AnalysisLocation", "type": "select", "options": [ { "text": "MEX", "value": "Latin America" }, { "text": "USA", "value": "United States" } ] } ] } } } } } } }, "deprecated": false } }, "/transactions/{transactions.id}": { "get": { "tags": [ "Antifraud Flow" ], "summary": "Get Antifraud Status", "description": "GET antifraud Status. Implement this API because VTEX will call it to get the status of the antifraud analysis.", "operationId": "GetAntifraudStatus", "parameters": [ { "name": "Content-Type", "in": "header", "description": "", "required": true, "style": "simple", "schema": { "type": "string", "example": "application/json" } }, { "name": "X-PROVIDER-API-AppKey", "in": "header", "description": "", "required": true, "style": "simple", "schema": { "type": "string", "default": "{{X-VTEX-API-AppKey}}" } }, { "name": "X-PROVIDER-API-AppToken", "in": "header", "description": "", "required": true, "style": "simple", "schema": { "type": "string", "default": "{{X-VTEX-API-AppToken}}" } }, { "name": "transactions.id", "in": "path", "description": "", "required": true, "style": "simple", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "headers": { "cache-control": { "content": { "text/plain": { "schema": { "type": "string" }, "example": "no-cache" } } }, "connection": { "content": { "text/plain": { "schema": { "type": "string" }, "example": "keep-alive" } } }, "content-length": { "content": { "text/plain": { "schema": { "type": "string" }, "example": "212" } } }, "content-type": { "content": { "text/plain": { "schema": { "type": "string" }, "example": "application/json; charset=utf-8" } } }, "date": { "content": { "text/plain": { "schema": { "type": "string" }, "example": "Thu, 03 May 2018 18:48:27 GMT" } } }, "expires": { "content": { "text/plain": { "schema": { "type": "string" }, "example": "-1" } } }, "pragma": { "content": { "text/plain": { "schema": { "type": "string" }, "example": "no-cache" } } }, "server": { "content": { "text/plain": { "schema": { "type": "string" }, "example": "Microsoft-IIS/8.0" } } }, "x-aspnet-version": { "content": { "text/plain": { "schema": { "type": "string" }, "example": "4.0.30319" } } }, "x-powered-by": { "content": { "text/plain": { "schema": { "type": "string" }, "example": "ASP.NET" } } }, "x-vtex-operation-id": { "content": { "text/plain": { "schema": { "type": "string" }, "example": "c7e11326-136e-43f8-8a91-4ac56ac55a41" } } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetAntifraudStatus" }, "example": { "id": "BF900B7CB15147F98D91208989100A05", "tid": "3146f46162f042f483cd3979ba4e8317", "status": "approved", "fraudRiskPercentage": 5.01, "analysisType": "authomatic", "responses": { "foo": "anyFoo", "custom": "customAnyValue" } } } } } }, "deprecated": false, "servers": [ { "url": "http://{{providersApiEndpoint}}.com", "description": "VTEX server URL" } ] } }, "/transactions/{transactions.Id}": { "delete": { "tags": [ "Antifraud Flow" ], "summary": "Stop Antifraud Analysis (optional)", "description": "Stop antifraud analysis.", "operationId": "StopAntifraudAnalysis(optional)", "parameters": [ { "name": "Content-Type", "in": "header", "description": "", "required": true, "style": "simple", "schema": { "type": "string", "example": "application/json" } }, { "name": "X-PROVIDER-API-AppKey", "in": "header", "description": "", "required": true, "style": "simple", "schema": { "type": "string", "default": "{{X-VTEX-API-AppKey}}" } }, { "name": "X-PROVIDER-API-AppToken", "in": "header", "description": "", "required": true, "style": "simple", "schema": { "type": "string", "default": "{{X-VTEX-API-AppToken}}" } }, { "name": "transactions.Id", "in": "path", "description": "", "required": true, "style": "simple", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "headers": { "Cache-Control": { "content": { "text/plain": { "schema": { "type": "string" }, "example": "no-cache" } } }, "Connection": { "content": { "text/plain": { "schema": { "type": "string" }, "example": "keep-alive" } } }, "Content-Length": { "content": { "text/plain": { "schema": { "type": "string" }, "example": "133" } } }, "Date": { "content": { "text/plain": { "schema": { "type": "string" }, "example": "Wed, 02 Aug 2017 18:20:51 GMT" } } }, "Expires": { "content": { "text/plain": { "schema": { "type": "string" }, "example": "-1" } } }, "Pragma": { "content": { "text/plain": { "schema": { "type": "string" }, "example": "no-cache" } } }, "Server": { "content": { "text/plain": { "schema": { "type": "string" }, "example": "Microsoft-IIS/8.0" } } }, "X-AspNet-Version": { "content": { "text/plain": { "schema": { "type": "string" }, "example": "4.0.30319" } } }, "X-Powered-By": { "content": { "text/plain": { "schema": { "type": "string" }, "example": "ASP.NET" } } }, "x-vtex-operation-id": { "content": { "text/plain": { "schema": { "type": "string" }, "example": "30984ee5-21fa-4618-b599-ec1dbf56e556" } } } }, "content": { "application/json; charset=utf-8": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/GetPaymentMethodsSupported" } }, "example": [ { "name": "CreditCard" }, { "name": "DebitCard" }, { "name": "GiftCard" }, { "name": "BankIssueInvoice" }, { "name": "Voucher" }, { "name": "Promissory" } ] } } } }, "deprecated": false, "servers": [ { "url": "http://{{providersApiEndpoint}}.com", "description": "VTEX server URL" } ] } }, "/authorization/token": { "post": { "tags": [ "OAuth Flow" ], "summary": "1. Retrieve Token", "description": "In this API Call VTEX will expect a token to be created.", "operationId": "1.RetrieveToken", "parameters": [], "requestBody": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/1.RetrieveTokenRequest" }, "example": { "applicationId": "vtex", "returnUrl": "https://storevtex.vtexpayments.com/?authorizationCode=" } } }, "required": true }, "responses": { "200": { "description": "", "headers": { "Cache-Control": { "content": { "text/plain": { "schema": { "type": "string" }, "example": "no-cache" } } }, "Connection": { "content": { "text/plain": { "schema": { "type": "string" }, "example": "keep-alive" } } }, "Content-Length": { "content": { "text/plain": { "schema": { "type": "string" }, "example": "71" } } }, "Date": { "content": { "text/plain": { "schema": { "type": "string" }, "example": "Mon, 16 Jul 2018 15:10:44 GMT" } } }, "Expires": { "content": { "text/plain": { "schema": { "type": "string" }, "example": "-1" } } }, "Pragma": { "content": { "text/plain": { "schema": { "type": "string" }, "example": "no-cache" } } }, "Server": { "content": { "text/plain": { "schema": { "type": "string" }, "example": "Microsoft-IIS/8.0" } } }, "X-AspNet-Version": { "content": { "text/plain": { "schema": { "type": "string" }, "example": "4.0.30319" } } }, "X-Powered-By": { "content": { "text/plain": { "schema": { "type": "string" }, "example": "ASP.NET" } } }, "x-vtex-operation-id": { "content": { "text/plain": { "schema": { "type": "string" }, "example": "d8f17ed2-ba9f-4f6d-8f8c-52bd425d7a52" } } } }, "content": { "application/json; charset=utf-8": { "schema": { "$ref": "#/components/schemas/1.RetrieveToken" }, "example": { "applicationId": "vtex", "token": "358a5bea-07d0-4122-888a-54ab70b5f02f" } } } } }, "deprecated": false, "servers": [ { "url": "http://{providerApiEndpoint}/authorization", "variables": { "providerBaseUrl": { "default": "DefaultParameterValue" } } } ] } }, "/redirect": { "get": { "tags": [ "OAuth Flow" ], "summary": "2. Redirect", "description": "VTEX will redirect the store administrator to the Payment Provider Web Site.", "operationId": "2.Redirect", "parameters": [ { "name": "token", "in": "query", "description": "", "required": true, "style": "form", "explode": true, "schema": { "type": "string", "example": "{token}" } }, { "name": "applicationId", "in": "query", "description": "", "required": true, "style": "form", "explode": true, "schema": { "type": "string", "example": "vtex" } } ], "responses": { "200": { "description": "", "headers": {} } }, "deprecated": false, "servers": [ { "url": "http://{{providerApiEndpoint}}", "variables": { "providerBaseUrl": { "default": "DefaultParameterValue" } } } ] } }, "/authorizationCode={providerAuthorizationCode}": { "get": { "tags": [ "OAuth Flow" ], "summary": "3. Return to VTEX", "description": "The PROVIDER will redirect the store administrator to the VTEX Web Site.", "operationId": "3.ReturntoVTEX", "parameters": [ { "name": "providerAuthorizationCode", "in": "path", "description": "", "required": true, "style": "simple", "explode": true, "schema": { "type": "string", "example": "{providerAuthorizationCode}" } } ], "responses": { "200": { "description": "", "headers": {} } }, "deprecated": false, "servers": [ { "url": "http://{{providerApiEndpoint}}", "variables": { "returnUrl": { "default": "DefaultParameterValue" } } } ] } }, "/authorization/credentials": { "get": { "tags": [ "OAuth Flow" ], "summary": "4. Get Credentials", "description": "", "operationId": "4.GetCredentials", "parameters": [ { "name": "authorizationCode", "in": "query", "description": "", "required": true, "style": "form", "explode": true, "schema": { "type": "string", "example": "{authorizationCode}" } }, { "name": "applicationId", "in": "query", "description": "", "required": true, "style": "form", "explode": true, "schema": { "type": "string", "example": "vtex" } } ], "responses": { "200": { "description": "", "headers": { "Cache-Control": { "content": { "text/plain": { "schema": { "type": "string" }, "example": "no-cache" } } }, "Connection": { "content": { "text/plain": { "schema": { "type": "string" }, "example": "keep-alive" } } }, "Content-Length": { "content": { "text/plain": { "schema": { "type": "string" }, "example": "122" } } }, "Date": { "content": { "text/plain": { "schema": { "type": "string" }, "example": "Mon, 16 Jul 2018 14:22:51 GMT" } } }, "Expires": { "content": { "text/plain": { "schema": { "type": "string" }, "example": "-1" } } }, "Pragma": { "content": { "text/plain": { "schema": { "type": "string" }, "example": "no-cache" } } }, "Server": { "content": { "text/plain": { "schema": { "type": "string" }, "example": "Microsoft-IIS/8.0" } } }, "X-AspNet-Version": { "content": { "text/plain": { "schema": { "type": "string" }, "example": "4.0.30319" } } }, "X-Powered-By": { "content": { "text/plain": { "schema": { "type": "string" }, "example": "ASP.NET" } } }, "x-vtex-operation-id": { "content": { "text/plain": { "schema": { "type": "string" }, "example": "187e390e-8cf8-4f42-a376-242f5ef4f740" } } } }, "content": { "application/json; charset=utf-8": { "schema": { "$ref": "#/components/schemas/3.GetCredentials" }, "example": { "applicationId": "vtex", "appKey": "c5a5e3f1-4a77-4a00-8b53-0d1adb3e9628", "appToken": "57ea254d-f3d3-488d-88d7-129766037ed1" } } } } }, "deprecated": false, "servers": [ { "url": "http://{providerBaseUrl}/authorization", "variables": { "providerBaseUrl": { "default": "DefaultParameterValue" } } } ] } } }, "components": { "securitySchemes": { "appKey": { "type": "apiKey", "in": "header", "name": "X-VTEX-API-AppKey" }, "appToken": { "type": "apiKey", "in": "header", "name": "X-VTEX-API-AppToken" } }, "schemas": { "Success": { "title": "Success", "required": [ "customFields" ], "type": "object", "properties": { "cardholderDocument":{ "type": "string", "description": "Indicates the requirement of cardholder document in card transactions. The field has three possible values: `required`, `optional`, or `unused`." }, "customFields": { "type": "array", "items": { "type": "object", "additionalProperties": true }, "description": "" } }, "example": { "customFields": [ { "name": "ApiKey", "type": "text" }, { "name": "AnalysisLocation", "type": "select", "options": [ { "text": "MEX", "value": "Latin America" }, { "text": "USA", "value": "United States" } ] } ] } }, "SendAntifraudDataRequest": { "title": "SendAntifraudDataRequest", "required": [ "id", "reference", "value", "ip", "store", "deviceFingerprint", "miniCart", "payments", "sellerId", "hook", "transactionStartDate" ], "type": "object", "properties": { "id": { "type": "string", "default": "D3AA1F", "description": "VTEX transaction ID. The ID of the transaction related with this payment." }, "reference": { "type": "string", "default": "v32vtx-01", "description": "VTEX order reference key. The key of the order (from VTEX OMS system) related with this payment." }, "value": { "type": "integer", "format": "int32", "default": 10, "description": "VTEX transaction order value." }, "ip": { "type": "string", "default": "10.0.0.1", "description": "The original ip address from browser." }, "store": { "type": "string", "default": "insert store name here", "description": "VTEX has a main Name for the store. This unique name is often used in url to access VTEX configurations." }, "deviceFingerprint": { "type": "string", "default": "insert device here", "description": "Device fingerprint generated by the provider. This is generated by using Google Tag Manager that the provider implements. This field is optional, is sent only if received. See **Implement Device Fingerprint**" }, "miniCart": { "$ref": "#/components/schemas/MiniCart" }, "payments": { "type": "array", "items": { "$ref": "#/components/schemas/Payment" }, "description": "" }, "hook": { "type": "string", "description": "URL to be called when the payment has it's status changed" }, "transactionStartDate": { "type": "string", "default": "2020-10-30T18:08:23Z", "description": "The date and time when the transaction started. It must be in the ISO 8601 format" } }, "default": { "id": "D3AA1FC8372E430E8236649DB5EBD08E", "sellerId": "vtexargentina", "reference": "v32478982vtx-01", "value": 10, "ip": "10.0.0.1", "store": "serasa", "deviceFingerprint": "Generated_using_GTM_Store_Is_Responsible_To_Configure", "miniCart": { "buyer": { "id": "c1245228-1c68-11e6-94ac-0afa86a846a5", "firstName": "John", "lastName": "Doe", "document": "012.345.678-90", "documentType": "CPF", "email": "john@doe.com", "phone": "+5521987654321", "address": { "country": "BRA", "street": "Rua Praia de Botafogo", "number": "518", "complement": "2o. andar", "neighborhood": "Botafogo", "postalCode": "22250-040", "city": "Rio de Janeiro", "state": "RJ" } }, "shipping": { "value": 8.41, "estimatedDate": "2017-08-02T14:46:47", "address": { "country": "BRA", "street": "Rua Praia de Botafogo", "number": "518", "complement": "2o. andar", "neighborhood": "Botafogo", "postalCode": "22250-040", "city": "Rio de Janeiro", "state": "RJ" } }, "items": [ { "id": "132981", "name": "Some useful product", "price": 20.51, "quantity": 2, "deliveryType": "Normal", "deliverySlaInMinutes": 4320, "categoryId": "111", "categoryName": "Electronica", "discount": 1.99, "sellerId": "vtexargentina" }, { "id": "123242", "name": "Some useless product", "price": 21.98, "quantity": 1, "deliveryType": "Normal", "deliverySlaInMinutes": 4320, "categoryId": "123", "categoryName": "Lar", "discount": 1.01, "sellerId": "vtexargentina" } ], "taxValue": 5.58, "listRegistry": { "name": "Minha lista Presente", "deliveryToOwner": false } }, "payments": [ { "id": "2D00", "method": "Credit Card", "name": "Visa", "value": 63.98, "currencyIso4217": "BRL", "installments": 3, "details": { "bin": "507860", "lastDigits": "2798", "holder": "example", "address": { "country": "BRA", "street": "address", "number": "518", "complement": "address", "neighborhood": "address", "postalCode": "insert postal code here", "city": "Rio de Janeiro", "state": "RJ" } } }, { "id": "04D4", "method": "Gift Card", "name": "example", "value": 10.01, "currencyIso4217": "BRL", "installments": 1 } ], "hook": "https://hook.vtex.com/notifyIfChangeStatus", "transactionStartDate": "2020-10-30T18:08:23Z" } }, "MiniCart": { "title": "MiniCart", "required": [ "buyer", "shipping", "items", "taxValue", "listRegistry" ], "type": "object", "properties": { "buyer": { "$ref": "#/components/schemas/Buyer" }, "shipping": { "$ref": "#/components/schemas/Shipping" }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/Item" }, "description": "" }, "taxValue": { "type": "number", "description": "Total tax value" }, "listRegistry": { "$ref": "#/components/schemas/ListRegistry" } }, "default": { "buyer": { "id": "c12", "firstName": "example", "lastName": "example", "document": "999.999.999-99", "documentType": "CPF", "email": "email@domain.com", "phone": "+552199999999", "address": { "country": "BRA", "street": "address", "number": "518", "complement": "address", "neighborhood": "example", "postalCode": "insert postal code here", "city": "Rio de Janeiro", "state": "RJ" } }, "shipping": { "value": 8.41, "estimatedDate": "2017-08-02T14:46:47", "address": { "country": "BRA", "street": "address", "number": "518", "complement": "address", "neighborhood": "address", "postalCode": "insert postal code here", "city": "Rio de Janeiro", "state": "RJ" } }, "items": [ { "id": "13", "name": "example", "price": 20.51, "quantity": 2, "deliveryType": "express", "deliverySlaInMinutes": 4320, "categoryId": "111", "categoryName": "example", "discount": 1.99, "sellerId": "vtexargentina" }, { "id": "123242", "name": "example", "price": 21.98, "quantity": 1, "deliveryType": "express", "deliverySlaInMinutes": 4320, "categoryId": "123", "categoryName": "example", "discount": 1.01, "sellerId": "vtexargentina" } ], "taxValue": 5.58, "listRegistry": { "name": "example", "deliveryToOwner": false } } }, "Buyer": { "title": "Buyer", "required": [ "id", "firstName", "lastName", "document", "documentType", "email", "phone", "address" ], "type": "object", "properties": { "id": { "type": "string", "description": "VTEX buyer ID. The unique identifier of the buyer" }, "firstName": { "type": "string", "description": "First name of the buyer" }, "lastName": { "type": "string", "description": "Last name of the buyer" }, "document": { "type": "string", "description": "Document number of the buyer" }, "documentType": { "type": "string", "description": "Type of document of the buyer. It depends on the country" }, "email": { "type": "string", "description": "Email of the buyer" }, "phone": { "type": "string", "description": "Phone number of the buyer" }, "address": { "$ref": "#/components/schemas/Address" } }, "default": { "id": "c1245228", "firstName": "example", "lastName": "example", "document": "099.999.999-99", "documentType": "CPF", "email": "email@domain.com", "phone": "+55219999999999", "address": { "country": "BRA", "street": "address", "number": "518", "complement": "address", "neighborhood": "address", "postalCode": "insert postal code here", "city": "Rio de Janeiro", "state": "RJ" } } }, "Address": { "title": "Address", "required": [ "country", "street", "number", "complement", "neighborhood", "postalCode", "city", "state" ], "type": "object", "properties": { "country": { "type": "string", "description": "Buyer address country" }, "street": { "type": "string", "description": "Buyer address street" }, "number": { "type": "string", "description": "Buyer address number" }, "complement": { "type": "string", "description": "Buyer address complement" }, "neighborhood": { "type": "string", "description": "Buyer address neighborhood" }, "postalCode": { "type": "string", "description": "Buyer address postal code" }, "city": { "type": "string", "description": "Buyer address city" }, "state": { "type": "string", "description": "Buyer address state" } }, "example": { "country": "BRA", "street": "Rua Praia de Botafogo", "number": "518", "complement": "2o. andar", "neighborhood": "Botafogo", "postalCode": "22250-040", "city": "Rio de Janeiro", "state": "RJ" } }, "Shipping": { "title": "Shipping", "required": [ "value", "estimatedDate", "address" ], "type": "object", "properties": { "value": { "type": "number", "description": "Shipping value with two decimal places" }, "estimatedDate": { "type": "string", "description": "Estimated shipping date ISO 8601" }, "address": { "$ref": "#/components/schemas/Address" } }, "example": { "value": 8.41, "estimatedDate": "2017-08-02T14:46:47", "address": { "country": "BRA", "street": "Rua Praia de Botafogo", "number": "518", "complement": "2o. andar", "neighborhood": "Botafogo", "postalCode": "22250-040", "city": "Rio de Janeiro", "state": "RJ" } } }, "Item": { "title": "Item", "required": [ "id", "name", "price", "quantity", "deliveryType", "deliverySlaInMinutes", "categoryId", "categoryName", "discount", "sellerId" ], "type": "object", "properties": { "id": { "type": "string", "description": "VTEX product ID. The ID of the item" }, "name": { "type": "string", "description": "Item name" }, "price": { "type": "number", "description": "Item price" }, "quantity": { "type": "integer", "format": "int32", "description": "Quantity of this item in the cart" }, "deliveryType": { "type": "string", "description": "Type of delivery configured by the store" }, "deliverySlaInMinutes": { "type": "integer", "format": "int32", "description": "Each item can have a separate shipping sla in minutes" }, "categoryId": { "type": "string", "description": "Category ID for the Item. Configured by each store" }, "categoryName": { "type": "string", "description": "Category name for the Item. Configured by each store" }, "discount": { "type": "number", "description": "Discount applied on item(s) two decimal places" }, "sellerId": { "type": "string", "description": "In case of a marketplace transaction, this is the Id of the seller for this specific item. Otherwise, this is filled with a '1'" } }, "example": { "id": "132981", "name": "Some useful product", "price": 20.51, "quantity": 2, "deliveryType": "Normal", "deliverySlaInMinutes": 4320, "categoryId": "111", "categoryName": "Electronica", "discount": 1.99, "sellerId": "vtexargentina" } }, "ListRegistry": { "title": "ListRegistry", "required": [ "name", "deliveryToOwner" ], "type": "object", "properties": { "name": { "type": "string", "description": "List name defined by the store" }, "deliveryToOwner": { "type": "boolean", "description": "Flag to mark if the order will be delivered to list creator or not" } }, "example": { "name": "Minha lista Presente", "deliveryToOwner": false } }, "Payment": { "title": "Payment", "required": [ "id", "method", "value", "currencyIso4217", "installments" ], "type": "object", "properties": { "id": { "type": "string", "description": "Payment ID unique identifier in VTEX" }, "method": { "type": "string", "description": "Payment method used for the buyer" }, "name": { "type": "string", "description": "Payment name used for the buyer. This name could be the brand card or the VTEX payment method" }, "value": { "type": "number", "description": "Payment value. Two decimal places" }, "currencyIso4217": { "type": "string", "description": "The currency used in each payment in the Transaction. It must be in the ISO 4217 format." }, "installments": { "type": "integer", "format": "int32", "description": "Number of installments" }, "details": { "$ref": "#/components/schemas/Details" } }, "default": { "id": "2D00FEBB", "method": "CreditCard", "name": "Visa", "value": 63.98, "currencyIso4217": "BRL", "installments": 3, "details": { "bin": "507860", "lastDigits": "2798", "holder": "John Doe", "address": { "country": "BRA", "street": "Rua Praia de Botafogo", "number": "518", "complement": "2o. andar", "neighborhood": "Botafogo", "postalCode": "22250-040", "city": "Rio de Janeiro", "state": "RJ" } } } }, "Details": { "title": "Details", "required": [ "bin", "lastDigits", "holder", "address" ], "type": "object", "properties": { "bin": { "type": "string", "description": "Abbreviation for 'Bank Identification Number'. It's a code that identifies the institution responsable for issuing the credit card. " }, "lastDigits": { "type": "string", "description": "Credit card identifier number last digits" }, "holder": { "type": "string", "description": "Credit card owner" }, "address": { "$ref": "#/components/schemas/Address" } }, "default": { "bin": "507860", "lastDigits": "2798", "holder": "example", "address": { "country": "BRA", "street": "address", "number": "518", "complement": "address", "neighborhood": "address", "postalCode": "insert postal code here", "city": "Rio de Janeiro", "state": "RJ" } } }, "SendAntifraudData": { "title": "SendAntifraudData", "required": [ "id", "tid", "code", "message", "status", "score", "analysisType", "responses" ], "type": "object", "properties": { "id": { "type": "string" }, "tid": { "type": "string" }, "code": { "type": "string" }, "message": { "type": "string" }, "status": { "type": "string" }, "score": { "type": "number" }, "analysisType": { "type": "string" }, "responses": { "$ref": "#/components/schemas/Responses" } }, "default": { "id": "D3AA1F", "tid": "4692c1", "code": "customCode", "message": "customMessage", "status": "approved", "score": 5.01, "analysisType": "authomatic", "responses": { "foo": "anyFoo", "custom": "customAnyValue" } } }, "Responses": { "title": "Responses", "required": [ "foo", "custom" ], "type": "object", "properties": { "foo": { "type": "string" }, "custom": { "type": "string" } }, "default": { "foo": "anyFoo", "custom": "customAnyValue" } }, "UpdateAntifraudTransactionsoptionalRequest": { "title": "UpdateAntifraudTransactions(optional)Request", "required": [ "id", "reference", "value", "ip", "store", "deviceFingerprint", "miniCart", "payments", "hook" ], "type": "object", "properties": { "id": { "type": "string" }, "reference": { "type": "string" }, "value": { "type": "integer", "format": "int32" }, "ip": { "type": "string" }, "store": { "type": "string" }, "deviceFingerprint": { "type": "string" }, "miniCart": { "$ref": "#/components/schemas/MiniCart" }, "payments": { "type": "array", "items": { "$ref": "#/components/schemas/Payment" }, "description": "" }, "hook": { "type": "string" } }, "example": { "id": "D3AA1FC8372E430E8236649DB5EBD08E", "reference": "v32478982vtx-01", "value": 10, "ip": "10.0.0.1", "store": "serasa", "deviceFingerprint": "Generated_using_GTM_Store_Is_Responsible_To_Configure", "miniCart": { "buyer": { "id": "c1245228-1c68-11e6-94ac-0afa86a846a5", "firstName": "John", "lastName": "Doe", "document": "012.345.678-90", "documentType": "CPF", "email": "john@doe.com", "phone": "+5521987654321", "address": { "country": "BRA", "street": "Rua Praia de Botafogo", "number": "518", "complement": "2o. andar", "neighborhood": "Botafogo", "postalCode": "22250-040", "city": "Rio de Janeiro", "state": "RJ" } }, "shipping": { "value": 8.41, "estimatedDate": "2017-08-02T14:46:47", "address": { "country": "BRA", "street": "Rua Praia de Botafogo", "number": "518", "complement": "2o. andar", "neighborhood": "Botafogo", "postalCode": "22250-040", "city": "Rio de Janeiro", "state": "RJ" } }, "items": [ { "id": "132981", "name": "Some useful product", "price": 20.51, "quantity": 2, "deliveryType": "Normal", "deliverySlaInMinutes": 4320, "categoryId": "111", "categoryName": "Electronica", "discount": 1.99, "sellerId": "vtexargentina" }, { "id": "123242", "name": "Some useless product", "price": 21.98, "quantity": 1, "deliveryType": "Normal", "deliverySlaInMinutes": 4320, "categoryId": "123", "categoryName": "Lar", "discount": 1.01, "sellerId": "vtexargentina" } ], "taxValue": 5.58, "listRegistry": { "name": "Minha lista Presente", "deliveryToOwner": false } }, "payments": [ { "id": "2D00", "method": "CreditCard", "name": "Visa", "value": 63.98, "currencyIso4217": "BRL", "installments": 3, "details": { "bin": "507", "lastDigits": "2798", "holder": "example", "address": { "country": "BRA", "street": "Rua Praia de Botafogo", "number": "518", "complement": "2o. andar", "neighborhood": "Botafogo", "postalCode": "22250-040", "city": "Rio de Janeiro", "state": "RJ" } } }, { "id": "04D4", "method": "Gift Card", "value": 10.01, "currencyIso4217": "BRL", "installments": 1 } ], "hook": "https://hook.vtex.com/notifyIfChangeStatus" } }, "ApproveAntifraudAnalysisResponse": { "title": "ApproveAntifraudAnalysisResponse", "required": [ "id", "status", "fraudRiskPercentage", "analysisType", "responses" ], "type": "object", "properties": { "id": { "type": "string" }, "status": { "type": "string" }, "fraudRiskPercentage": { "type": "number" }, "analysisType": { "type": "string" }, "responses": { "type": "string", "nullable": true } }, "example": { "id": "D3AA1FC8372E430E8236649DB5EBD08E", "status": "approved", "fraudRiskPercentage": 0.0, "analysisType": "authomatic", "responses": null } }, "GetAntifraudStatus": { "title": "GetAntifraudStatus", "required": [ "id", "tid", "status", "fraudRiskPercentage", "analysisType", "responses" ], "type": "object", "properties": { "id": { "type": "string" }, "tid": { "type": "string" }, "status": { "type": "string" }, "fraudRiskPercentage": { "type": "number" }, "analysisType": { "type": "string" }, "responses": { "$ref": "#/components/schemas/Responses" } }, "example": { "id": "BF900B7CB15147F98D91208989100A05", "tid": "3146f46162f042f483cd3979ba4e8317", "status": "approved", "fraudRiskPercentage": 5.01, "analysisType": "authomatic", "responses": { "foo": "anyFoo", "custom": "customAnyValue" } } }, "GetPaymentMethodsSupported": { "title": "GetPaymentMethodsSupported", "required": [ "name" ], "type": "object", "properties": { "name": { "type": "string" } }, "example": { "name": "CreditCard" } }, "1.RetrieveTokenRequest": { "title": "1.RetrieveTokenRequest", "required": [ "applicationId", "returnUrl" ], "type": "object", "properties": { "applicationId": { "type": "string" }, "returnUrl": { "type": "string" } }, "example": { "applicationId": "vtex", "returnUrl": "https://storevtex.vtexpayments.com/?authorizationCode=" } }, "1.RetrieveToken": { "title": "1.RetrieveToken", "required": [ "applicationId", "token" ], "type": "object", "properties": { "applicationId": { "type": "string" }, "token": { "type": "string" } }, "example": { "applicationId": "vtex", "token": "358a5bea-07d0-4122-888a-54ab70b5f02f" } }, "3.GetCredentials": { "title": "3.GetCredentials", "required": [ "applicationId", "appKey", "appToken" ], "type": "object", "properties": { "applicationId": { "type": "string" }, "appKey": { "type": "string" }, "appToken": { "type": "string" } }, "example": { "applicationId": "vtex", "appKey": "c5a5e3f1-4a77-4a00-8b53-0d1adb3e9628", "appToken": "57ea254d-f3d3-488d-88d7-129766037ed1" } } } }, "tags": [ { "name": "Antifraud Flow" }, { "name": "OAuth Flow" } ], "security": [ { "appKey": [], "appToken": [] } ] }